package com.xiuyanwitmed.wxapi.controller;

import com.xiuyanwitmed.common.core.domain.AjaxResult;
import com.xiuyanwitmed.common.core.domain.entity.SysDept;
import com.xiuyanwitmed.system.service.ISysDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wxapi/dept")
@RequiredArgsConstructor
@Api(tags = "微信端-部门信息")
public class WxDeptController {

    private final ISysDeptService sysDeptService;

    @GetMapping("/list")
    @ApiOperation(value = "获取部门列表")
    public AjaxResult list(SysDept dept)
    {
        List<SysDept> depts = sysDeptService.selectDeptList(dept);
        return AjaxResult.success(depts);
    }
}
